<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>华猫商城</title>
		<style></style>
		<link href="../css/jquery.validator.css" rel="stylesheet">
		<link href="../css/common.css" rel="stylesheet">

		<link href="../plugin/userLib/css/user.css" rel="stylesheet">
		<link href="../plugin/userLib/css/userinfo.css" rel="stylesheet">
		<link href="../plugin/userLib/css/my_user.css" rel="stylesheet">
		<link href="../css/base.css" rel="stylesheet">
		<link href="../plugin/webuploader/webuploader.css" rel="stylesheet">
		<style>
			.n-default .n-left,
			.n-default .n-right {
				margin-top: 32px!important;
			}
			
			#specsAttrBox .webuploader-container {
				width: 80px;
				height: 20px;
				overflow: hidden;
			}
			
			.ZZHT-form tr {
				padding: 10px 0;
			}
			
			.ZZHT-form tr th {
				font-size: 14px;
			}
			
			.ZZHT-form tr td .ip_text {
				width: 352px;
			}
			
			.ZZHT-form tr td .ip_select {
				width: 362px;
			}
			
			.ZZHT-form tr td {
				font-size: 14px;
			}
			
			.ZZHT-form tr td img {
				margin-right: 15px;
				vertical-align: middle;
			}
			
			.ZZHT-form tr td .thumbnail {
				margin-top: 45px;
			}
			
			.img-reader {
			}
			
			.reader {
				margin-bottom: 5px;
			}
			
			.reader img {
				width: auto;
				height: 110px;
			}
		</style>
	</head>

	<body>
		<div id="header"></div>
		<div id="headerBox"></div>
		<!--<div id="nav_menu"></div>-->
		<div class="ZZHT-wrap">
			<div class="ZZHT-header" style="border-bottom: 1px solid #ffffff;">
				<div class="ZZHT-shop-nav">
					<div class="ZZHT-nav-box">
						<a href="#">
							<li class="liselect ZZHT-lfloat ZZHT-nav-boxa">商城商家</li>
						</a>
						<div class="ZZHT-clear"></div>
					</div>
				</div>
				<div class="ZZHT-clear"></div>
			</div>
			<div class="ZZHT-main">
				<div id="underLine_left"></div>
				<div class="ZZHT-content">

					<div class="ZZHT-user-head clearfix"><span class="left fl">我的店铺</span><span class="right fr">当前位置：我的店铺--基本信息</span></div>
					<div id="tab" class="ZZHT-tab-box">
						<div class="ZZHT-tab-content">
							<form id="setform" autocomplete="off" class="nice-validator n-default" novalidate="novalidate">
								<div class="ZZHT-tab-item" style="position: relative;padding: 30px 0;">
									<table class="ZZHT-form">
										<tbody>
											<tr>
												<th width="150">简称：</th>
												<td>
													<input class="ip_text ipt" :value="tab.shopName" type="text" name="shopName" id="shopName" aria-required="true">
												</td>
											</tr>
											<tr>
												<th width="150">行业分类：</th>
												<td>
													<select class="ip_select ipt" id="industry" name="industry">
														<option value="1">生活服务</option>
														<option value="3">餐饮服务</option>
														<option value="4">酒店住宿</option>
														<option value="5">丽人</option>
														<option value="6">旅游出行</option>
														<option value="7">房产</option>
														<option value="8" selected="">汽车销售</option>
														<option value="9">数码电子</option>
														<option value="10">服装配饰</option>
														<option value="11">文化教育</option>
														<option value="12">家居家装</option>
														<option value="13">养生保健</option>
														<option value="14">保险</option>
														<option value="15">婚庆周边</option>
														<option value="16">火车票/机票</option>
														<option value="17">学习培训</option>
														<option value="18">其他行业</option>
													</select>
													<span id="typeTips"></span>
												</td>
											</tr>
											<tr>
												<th width="150">联系人：</th>
												<td>
													<input class="ip_text ipt" type="text" name="linkman" id="linkman" v-model="tab.linkman" aria-required="true">
												</td>
											</tr>
											<tr>
												<th width="150">联系电话：</th>
												<td>
													<input class="ip_text ipt" type="text" name="telephone" id="telephone" v-model="tab.telephone" aria-required="true">
												</td>
											</tr>
											<tr>
												<th width="150">经营地址：</th>
												<td>
													<input class="ip_text ipt" type="text" name="address" id="address" v-model="tab.address" aria-required="true">
												</td>
											</tr>
											<tr style="height: 110px;">
												<th width="150">店铺logo：</th>
												<td>
													<div class="upload clearfix">
														<div class="img-reader fl">
															<img id="logo_png" src="" alt="" width="100" height="100">
														</div>
														<div class="thumbnail fl" style="margin-left: 20px;">
															<span class="upload-btn webuploader-container" id="adFilePicker0"><div class="webuploader-pick">上传</div><div id="rt_rt_1cd258cq6jmd1r0k1569dg71ens1" style="position: absolute; top: -15px; left: 0px; width: 120px; height: 44px; overflow: hidden; bottom: auto; right: auto;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></span>
															<input type="hidden" class="input-file bz upload-files ipt" id="logo" value="">
															<span class="ZZHT-f999 fr" style="margin-left: 5px;font-size: 12px;">店铺logo参考比例：1:1</span>
														</div>
													</div>
												</td>
											</tr>

											<tr style="height: 110px;">
												<th width="150">banner一：</th>
												<td>
													<div class="upload clearfix">
														<div class="img-reader reader fl">
															<img class="banner1" src="http://zzhtwl.oss-cn-qingdao.aliyuncs.com/sysconfigs/83c2fae348f511493d1545c4e88b6463.png"  alt="">
														</div>
														<div class="thumbnail fl">
															<span class="upload-btn webuploader-container" id="adFilePicker1"><div class="webuploader-pick">上传</div><div id="rt_rt_1cd258cqc1egp1evdbdi1b78ra24" style="position: absolute; top: -15px; left: 0px; width: 120px; height: 44px; overflow: hidden; bottom: auto; right: auto;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></span>
															<input type="hidden" class="input-file bz upload-files ipt" id="storeImg1" value="">
															<span class="ZZHT-f999 fr" style="margin-left: 5px;font-size: 12px;">banner一参考尺寸：750*625</span>
														</div>
													</div>
												</td>
											</tr>
											<tr style="height: 110px;">
												<th width="150">banner二：</th>
												<td>
													<div class="upload clearfix">
														<div class="img-reader reader fl">
															<img class="banner2" src="http://zzhtwl.oss-cn-qingdao.aliyuncs.com/sysconfigs/83c2fae348f511493d1545c4e88b6463.png"  alt="">
														</div>
														<div class="thumbnail fl">
															<span class="upload-btn webuploader-container" id="adFilePicker2"><div class="webuploader-pick">上传</div><div id="rt_rt_1cd258cqf4c22tm19odjp6q8c7" style="position: absolute; top: -15px; left: 0px; width: 120px; height: 44px; overflow: hidden; bottom: auto; right: auto;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></span>
															<input type="hidden" class="input-file bz upload-files ipt" id="storeImg2" value="">
															<span class="ZZHT-f999 fr" style="margin-left: 5px;font-size: 12px;">banner二参考尺寸：750*625</span>
														</div>
													</div>
												</td>
											</tr>
											<tr style="height: 110px;">
												<th width="150">banner三：</th>
												<td>
													<div class="upload clearfix">
														<div class="img-reader reader fl">
															<img class="banner3" src="http://zzhtwl.oss-cn-qingdao.aliyuncs.com/sysconfigs/83c2fae348f511493d1545c4e88b6463.png"  alt="">
														</div>
														<div class="thumbnail fl">
															<span class="upload-btn webuploader-container" id="adFilePicker3"><div class="webuploader-pick">上传</div><div id="rt_rt_1cd258cqh1fsbipa1j0c1v5fpg3a" style="position: absolute; top: -15px; left: 0px; width: 120px; height: 44px; overflow: hidden; bottom: auto; right: auto;"><input type="file" name="file" class="webuploader-element-invisible" multiple="multiple" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label></div></span>
															<input type="hidden" class="input-file bz upload-files ipt" id="storeImg3" value="">
															<span class="ZZHT-f999 fr" style="margin-left: 5px;font-size: 12px;">banner三参考尺寸：750*625</span>
														</div>
													</div>
												</td>
											</tr>
											<tr>
												<th width="150">促销语：</th>
												<td>
													<input class="ip_text ipt" type="text" name="intro" id="intro" :value="tab.intro">
												</td>
											</tr>
											<tr>
												<th width="150">公司简介：</th>
												<td>
													<textarea style="width: 351px;margin-top: 12px;" class="ipt" name="remark" id="content" data-target="#reamrkTips">{{tab.content}}</textarea>
													<span id="reamrkTips"></span>
												</td>
											</tr>
											<tr>
												<th width="150">营业时间：</th>
												<td>
													<input type="text" class="ipt" name="startTime" id="startTime" style="display: none;">
													<input type="text" class="ipt" name="endTime" id="endTime" style="display: none;">
													<input type="time" id="start" data-target="#tiemTips" placeholder="开始时间" value="">&nbsp;至&nbsp;
													<input type="time" id="end" data-target="#tiemTips" placeholder="结束时间" value="">
													<!--<span id="tiemTips"></span>-->
												</td>
											</tr>
											<tr>
												<th width="150">默认积分赠送比例：</th>
												<td>
													<input class="ip_text ipt" type="text" name="scoreRatio" id="scoreRatio" value="" v-model="tab.scoreRatio" data-target="#scoreRatioTips" aria-required="true"><span class="ZZHT-f999">(%)</span><span id="scoreRatioTips"></span>
												</td>
											</tr>
											<tr style="height: 100px !important;">
												<th width="150">&nbsp;</th>
												<td>
													<input class="fredBtn" type="submit" value="确认" id="btn_save">
												</td>
											</tr>
										</tbody>
									</table>
								</div>
							</form>
						</div>
					</div>

				</div>
			</div>
			<div style="clear:both;"></div>
			<br>
		</div>
		<div id="ck3"></div>
		<script src="../js/jquery.min.js"></script>
		<script src="../js/vue.min.js" ></script>
		<script src="../js/jquery.lazyload.min.js"></script>
		<script src="../js/jquery.validator.js"></script>
		<script src="../js/zh-CN.js"></script>
		
		<script src="../plugin/webuploader/webuploader.js"></script>
		<script src="../plugin/layer/layer.js"></script>
		<script src="../plugin/layer/laydate/laydate.js"></script>
		<script src="../js/ljf_base.js"></script>
		<script src="../js/common.js"></script>
		<script src="../js/common_view.js"></script>
		<script src="../plugin/userLib/js/set.js" ></script>
		<script>
			var shopId = '';
				
			var vm = new Vue({
				el:'.ZZHT-content',
				data:{
					tab:{},
				}
			});
			
			
			$.get(SURL+'sktShops/findByUserId', {userId:localStorage.userId}, function (data, textStatus) {//获取店铺id
                shopId = data.entity[0].shopId;
		        
		        //先获取店铺信息渲染页面
				$.ajax({
					type: "get",
					url: SURL + "sktShops/findShopsId",
					data: {
						"shopId": shopId,
					},
					success: function(res) {
						console.log(res);
					
						$('#logo_png').attr('src',res.entity[0].logo);
						$('#logo').val(res.entity[0].logo);
						if(res.entity[0].storeImg1){
							$('.banner1').attr('src',res.entity[0].storeImg1);
							$('#storeImg1').val(res.entity[0].storeImg1);
						}
						if(res.entity[0].storeImg2){
							$('.banner2').attr('src',res.entity[0].storeImg2);
							$('#storeImg2').val(res.entity[0].storeImg2);
						}
						if(res.entity[0].storeImg3){
							$('.banner3').attr('src',res.entity[0].storeImg3);
							$('#storeImg3').val(res.entity[0].storeImg3);
						}
						$('#start').val(res.entity[0].startTime);
						$('#end').val(res.entity[0].endTime);
						
						//方法2 根据text  选择所属行业
					    $("#industry option").each(function(){  
					        if($(this).text() == res.entity[0].hyName){  
					            $(this).attr("selected","selected");  
					        }  
					    });
					    
					    vm.tab = res.entity[0];
					    
					    editStore();
					}
				});
		        
		    });
				
		</script>
	</body>

</html>